home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / shootout.c < prev    next >
C/C++ Source or Header  |  2000-04-04  |  16KB  |  480 lines

  1. /*******************************************************************************
  2.  
  3.     Shoot Out (USA)                (c) 1985 Data East USA        DE-0219
  4.     Shoot Out (Japan)            (c) 1985 Data East USA        DE-0203
  5.     Shoot Out (Korean bootleg)    (c) 1985 Data East USA        DE-0203 bootleg
  6.  
  7.     Shoot Out (Japan) is an interesting board, it runs on an earlier PCB design
  8.     than the USA version, has no sound CPU, uses half as many sprites and
  9.     unusually for a Deco Japanese game it is credited to 'Data East USA'.
  10.     Perhaps the USA arm of Deco designed this game rather than the Japanese
  11.     arm?
  12.  
  13.     Shoot Out (Japan) uses the YM2203 ports for CPU bankswitching so it does
  14.     not work with sound turned off.
  15.  
  16.     Shoot Out (Korean bootleg) is based on the earlier DE-0203 board but
  17.     strangely features the same encryption as used on the DE-0219 board.  It
  18.     also has some edited graphics.
  19.  
  20.     Driver by:
  21.         Ernesto Corvi (ernesto@imagina.com)
  22.         Phil Stroffolino
  23.         Shoot Out (Japan) and fixes added by Bryan McPhail (mish@tendril.co.uk)
  24.  
  25.     Todo:
  26.     - Add cocktail support.
  27.  
  28. *******************************************************************************/
  29.  
  30. #include "driver.h"
  31. #include "vidhrdw/generic.h"
  32. #include "cpu/m6502/m6502.h"
  33.  
  34. /* externals: from vidhrdw */
  35. extern int shootout_vh_start( void );
  36. extern void shootout_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  37. extern void shootouj_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  38. unsigned char *shootout_textram;
  39.  
  40. extern void btime_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  41.  
  42. /*******************************************************************************/
  43.  
  44. static WRITE_HANDLER( shootout_bankswitch_w )
  45. {
  46.     int bankaddress;
  47.     unsigned char *RAM;
  48.  
  49.     RAM = memory_region(REGION_CPU1);
  50.     bankaddress = 0x10000 + ( 0x4000 * (data & 0x0f) );
  51.  
  52.     cpu_setbank(1,&RAM[bankaddress]);
  53. }
  54.  
  55. static WRITE_HANDLER( sound_cpu_command_w )
  56. {
  57.     soundlatch_w( offset, data );
  58.     cpu_cause_interrupt( 1, M6502_INT_NMI );
  59. }
  60.  
  61. /* stub for reading input ports as active low (makes building ports much easier) */
  62. static READ_HANDLER( low_input_r )
  63. {
  64.     return ~readinputport( offset );
  65. }
  66.  
  67. /*******************************************************************************/
  68.  
  69. static struct MemoryReadAddress readmem[] =
  70. {
  71.     { 0x0000, 0x0fff, MRA_RAM },
  72.     { 0x1000, 0x1003, low_input_r },
  73.     { 0x2000, 0x27ff, MRA_RAM },    /* foreground */
  74.     { 0x2800, 0x2bff, videoram_r }, /* background videoram */
  75.     { 0x2c00, 0x2fff, colorram_r }, /* background colorram */
  76.     { 0x4000, 0x7fff, MRA_BANK1 },
  77.     { 0x8000, 0xffff, MRA_ROM },
  78.     { -1 }    /* end of table */
  79. };
  80.  
  81. static struct MemoryWriteAddress writemem[] =
  82. {
  83.     { 0x0000, 0x0fff, MWA_RAM },
  84.     { 0x1000, 0x1000, shootout_bankswitch_w },
  85.     { 0x1001, 0x1001, MWA_NOP }, /* Todo:  Flipscreen */
  86.     { 0x1002, 0x1002, coin_counter_w },
  87.     { 0x1003, 0x1003, sound_cpu_command_w },
  88.     { 0x1004, 0x17ff, MWA_RAM },
  89.     { 0x1800, 0x19ff, MWA_RAM, &spriteram, &spriteram_size },
  90.     { 0x2000, 0x27ff, MWA_RAM, &shootout_textram },
  91.     { 0x2800, 0x2bff, videoram_w, &videoram, &videoram_size },
  92.     { 0x2c00, 0x2fff, colorram_w, &colorram },
  93.     { 0x4000, 0xffff, MWA_ROM },
  94.     { -1 }    /* end of table */
  95. };
  96.  
  97. static struct MemoryReadAddress readmem_alt[] =
  98. {
  99.     { 0x0000, 0x0fff, MRA_RAM },
  100.     { 0x1000, 0x1003, low_input_r },
  101.     { 0x2000, 0x21ff, MRA_RAM },
  102.     { 0x2800, 0x2800, YM2203_status_port_0_r },
  103.     { 0x3000, 0x37ff, MRA_RAM },    /* foreground */
  104.     { 0x3800, 0x3bff, videoram_r }, /* background videoram */
  105.     { 0x3c00, 0x3fff, colorram_r }, /* background colorram */
  106.     { 0x4000, 0x7fff, MRA_BANK1 },
  107.     { 0x8000, 0xffff, MRA_ROM },
  108.     { -1 }    /* end of table */
  109. };
  110.  
  111. static struct MemoryWriteAddress writemem_alt[] =
  112. {
  113.     { 0x0000, 0x0fff, MWA_RAM },
  114.     { 0x1800, 0x1800, coin_counter_w },
  115.     { 0x2000, 0x21ff, MWA_RAM, &spriteram, &spriteram_size },
  116.     { 0x2800, 0x2800, YM2203_control_port_0_w },
  117.     { 0x2801, 0x2801, YM2203_write_port_0_w },
  118.     { 0x3000, 0x37ff, MWA_RAM, &shootout_textram },
  119.     { 0x3800, 0x3bff, videoram_w, &videoram, &videoram_size },
  120.     { 0x3c00, 0x3fff, colorram_w, &colorram },
  121.     { 0x4000, 0xffff, MWA_ROM },
  122.     { -1 }    /* end of table */
  123. };
  124.  
  125. /*******************************************************************************/
  126.  
  127. static struct MemoryReadAddress sound_readmem[] =
  128. {
  129.     { 0x0000, 0x07ff, MRA_RAM },
  130.     { 0x4000, 0x4000, YM2203_status_port_0_r },
  131.     { 0xa000, 0xa000, soundlatch_r },
  132.     { 0xc000, 0xffff, MRA_ROM },
  133.     { -1 }    /* end of table */
  134. };
  135.  
  136. static struct MemoryWriteAddress sound_writemem[] =
  137. {
  138.     { 0x0000, 0x07ff, MWA_RAM },
  139.     { 0x4000, 0x4000, YM2203_control_port_0_w },
  140.     { 0x4001, 0x4001, YM2203_write_port_0_w },
  141.     { 0xd000, 0xd000, interrupt_enable_w },
  142.     { 0xc000, 0xffff, MWA_ROM },
  143.     { -1 }    /* end of table */
  144. };
  145.  
  146. /*******************************************************************************/
  147.  
  148. INPUT_PORTS_START( shootout )
  149.     PORT_START    /* DSW1 */
  150.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) )
  151.     PORT_DIPSETTING(    0x03, DEF_STR( 2C_1C ) )
  152.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  153.     PORT_DIPSETTING(    0x01, DEF_STR( 1C_2C ) )
  154.     PORT_DIPSETTING(    0x02, DEF_STR( 1C_3C ) )
  155.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coin_B ) )
  156.     PORT_DIPSETTING(    0x0c, DEF_STR( 2C_1C ) )
  157.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  158.     PORT_DIPSETTING(    0x04, DEF_STR( 1C_2C ) )
  159.     PORT_DIPSETTING(    0x08, DEF_STR( 1C_3C ) )
  160.     PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
  161.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  162.     PORT_DIPSETTING(    0x10, DEF_STR( On ) )
  163.     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
  164.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  165.     PORT_DIPSETTING(    0x20, DEF_STR( On ) )
  166.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Cabinet ) )
  167.     PORT_DIPSETTING(    0x40, DEF_STR( Upright ) )
  168.     PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
  169.     PORT_DIPNAME( 0x80, 0x00, "Freeze" )
  170.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  171.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  172.  
  173.     PORT_START
  174.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  175.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  176.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY )
  177.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  178.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  179.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  180.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 )
  181.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 )
  182.  
  183.     PORT_START
  184.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_COCKTAIL )
  185.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_COCKTAIL )
  186.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_COCKTAIL )
  187.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_COCKTAIL )
  188.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL )
  189.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_COCKTAIL )
  190.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 )
  191.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN2 )
  192.  
  193.     PORT_START     /* DSW2 */
  194.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
  195.     PORT_DIPSETTING(    0x02, "1" )
  196.     PORT_DIPSETTING(    0x00, "3" )
  197.     PORT_DIPSETTING(    0x01, "5" )
  198.     PORT_BITX(0,        0x03, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Infinite", IP_KEY_NONE, IP_JOY_NONE )
  199.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
  200.     PORT_DIPSETTING(    0x00, "20k 70k" )
  201.     PORT_DIPSETTING(    0x04, "30k 80k" )
  202.     PORT_DIPSETTING(    0x08, "40k 90k" )
  203.     PORT_DIPSETTING(    0x0c, "70k" )
  204.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Difficulty ) )
  205.     PORT_DIPSETTING(    0x00, "Easy" )
  206.     PORT_DIPSETTING(    0x10, "Medium" )
  207.     PORT_DIPSETTING(    0x20, "Hard" )
  208.     PORT_DIPSETTING(    0x30, "Hardest" )
  209.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* this is set when either coin is inserted */
  210.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
  211. INPUT_PORTS_END
  212.  
  213.  
  214. static struct GfxLayout char_layout =
  215. {
  216.     8,8,    /* 8*8 characters */
  217.     0x400,    /* 1024 characters */
  218.     2,    /* 2 bits per pixel */
  219.     { 0,4 },    /* the bitplanes are packed in the same byte */
  220.     { (0x2000*8)+0, (0x2000*8)+1, (0x2000*8)+2, (0x2000*8)+3, 0, 1, 2, 3 },
  221.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  222.     8*8    /* every char takes 8 consecutive bytes */
  223. };
  224. static struct GfxLayout sprite_layout =
  225. {
  226.     16,16,    /* 16*16 sprites */
  227.     0x800,    /* 2048 sprites */
  228.     3,    /* 3 bits per pixel */
  229.     { 0*0x10000*8, 1*0x10000*8, 2*0x10000*8 },    /* the bitplanes are separated */
  230.     { 128+0, 128+1, 128+2, 128+3, 128+4, 128+5, 128+6, 128+7, 0, 1, 2, 3, 4, 5, 6, 7 },
  231.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
  232.     32*8    /* every char takes 32 consecutive bytes */
  233. };
  234. static struct GfxLayout tile_layout =
  235. {
  236.     8,8,    /* 8*8 characters */
  237.     0x800,    /* 2048 characters */
  238.     2,    /* 2 bits per pixel */
  239.     { 0,4 },    /* the bitplanes are packed in the same byte */
  240.     { (0x4000*8)+0, (0x4000*8)+1, (0x4000*8)+2, (0x4000*8)+3, 0, 1, 2, 3 },
  241.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  242.     8*8    /* every char takes 8 consecutive bytes */
  243. };
  244.  
  245. static struct GfxDecodeInfo gfxdecodeinfo[] =
  246. {
  247.     { REGION_GFX1, 0, &char_layout,   16*4+8*8, 16 }, /* characters */
  248.     { REGION_GFX2, 0, &sprite_layout, 16*4,      8 }, /* sprites */
  249.     { REGION_GFX3, 0, &tile_layout,   0,        16 }, /* tiles */
  250.     { -1 } /* end of array */
  251. };
  252.  
  253. static void shootout_snd_irq(int linestate)
  254. {
  255.     cpu_set_irq_line(1,0,linestate);
  256. }
  257.  
  258. static void shootout_snd2_irq(int linestate)
  259. {
  260.     cpu_set_irq_line(0,0,linestate);
  261. }
  262.  
  263. static struct YM2203interface ym2203_interface =
  264. {
  265.     1,    /* 1 chip */
  266.     1500000,    /* 1.5 MHz */
  267.     { YM2203_VOL(50,50) },
  268.     { 0 },
  269.     { 0 },
  270.     { 0 },
  271.     { 0 },
  272.     { shootout_snd_irq },
  273. };
  274.  
  275. static struct YM2203interface ym2203_interface2 =
  276. {
  277.     1,    /* 1 chip */
  278.     1500000,    /* 1.5 MHz */
  279.     { YM2203_VOL(50,50) },
  280.     { 0 },
  281.     { 0 },
  282.     { shootout_bankswitch_w },
  283.     { 0 }, /* Todo:  Port B write is flipscreen */
  284.     { shootout_snd2_irq },
  285. };
  286.  
  287. static int shootout_interrupt(void)
  288. {
  289.     static int coin = 0;
  290.  
  291.     if ( readinputport( 2 ) & 0xc0 ) {
  292.         if ( coin == 0 ) {
  293.             coin = 1;
  294.             return nmi_interrupt();
  295.         }
  296.     } else
  297.         coin = 0;
  298.  
  299.     return 0;
  300. }
  301.  
  302. static struct MachineDriver machine_driver_shootout =
  303. {
  304.     /* basic machine hardware */
  305.     {
  306.         {
  307.             CPU_M6502,
  308.             2000000,    /* 2 Mhz? */
  309.             readmem,writemem,0,0,
  310.             shootout_interrupt,1 /* nmi's are triggered at coin up */
  311.         },
  312.         {
  313.             CPU_M6502 | CPU_AUDIO_CPU,
  314.             1500000,
  315.             sound_readmem,sound_writemem,0,0,
  316.             ignore_interrupt,0 /* this is a guess, but sounds just about right */
  317.         }
  318.     },
  319.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  320.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  321.     0,
  322.  
  323.     /* video hardware */
  324.     32*8, 32*8, { 0*8, 32*8-1, 1*8, 31*8-1 },
  325.     gfxdecodeinfo,
  326.     256,256,
  327.     btime_vh_convert_color_prom,
  328.  
  329.     VIDEO_TYPE_RASTER,
  330.     0,
  331.     shootout_vh_start,
  332.     generic_vh_stop,
  333.     shootout_vh_screenrefresh,
  334.  
  335.     /* sound hardware */
  336.     0,0,0,0,
  337.     {
  338.         {
  339.             SOUND_YM2203,
  340.             &ym2203_interface
  341.         }
  342.     }
  343. };
  344.  
  345. static struct MachineDriver machine_driver_shootouj =
  346. {
  347.     /* basic machine hardware */
  348.     {
  349.         {
  350.             CPU_M6502,
  351.             2000000,    /* 2 Mhz? */
  352.             readmem_alt,writemem_alt,0,0,
  353.             shootout_interrupt,1 /* nmi's are triggered at coin up */
  354.         }
  355.     },
  356.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  357.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  358.     0,
  359.  
  360.     /* video hardware */
  361.     32*8, 32*8, { 0*8, 32*8-1, 1*8, 31*8-1 },
  362.     gfxdecodeinfo,
  363.     256,256,
  364.     btime_vh_convert_color_prom,
  365.  
  366.     VIDEO_TYPE_RASTER,
  367.     0,
  368.     shootout_vh_start,
  369.     generic_vh_stop,
  370.     shootouj_vh_screenrefresh,
  371.  
  372.     /* sound hardware */
  373.     0,0,0,0,
  374.     {
  375.         {
  376.             SOUND_YM2203,
  377.             &ym2203_interface2
  378.         }
  379.     }
  380. };
  381.  
  382.  
  383. ROM_START( shootout )
  384.     ROM_REGION( 2*0x20000, REGION_CPU1 )    /* 128k for code + 128k for decrypted opcodes */
  385.     ROM_LOAD( "cu00.b1",        0x08000, 0x8000, 0x090edeb6 ) /* opcodes encrypted */
  386.     /* banked at 0x4000-0x8000 */
  387.     ROM_LOAD( "cu02.c3",        0x10000, 0x8000, 0x2a913730 ) /* opcodes encrypted */
  388.     ROM_LOAD( "cu01.c1",        0x18000, 0x4000, 0x8843c3ae ) /* opcodes encrypted */
  389.  
  390.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for code */
  391.     ROM_LOAD( "cu09.j1",        0x0c000, 0x4000, 0xc4cbd558 ) /* Sound CPU */
  392.  
  393.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  394.     ROM_LOAD( "cu11.h19",       0x00000, 0x4000, 0xeff00460 ) /* foreground characters */
  395.  
  396.     ROM_REGION( 0x30000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  397.     ROM_LOAD( "cu04.c7",        0x00000, 0x8000, 0xceea6b20 )    /* sprites */
  398.     ROM_LOAD( "cu03.c5",        0x08000, 0x8000, 0xb786bb3e )
  399.     ROM_LOAD( "cu06.c10",       0x10000, 0x8000, 0x2ec1d17f )
  400.     ROM_LOAD( "cu05.c9",        0x18000, 0x8000, 0xdd038b85 )
  401.     ROM_LOAD( "cu08.c13",       0x20000, 0x8000, 0x91290933 )
  402.     ROM_LOAD( "cu07.c12",       0x28000, 0x8000, 0x19b6b94f )
  403.  
  404.     ROM_REGION( 0x08000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  405.     ROM_LOAD( "cu10.h17",       0x00000, 0x2000, 0x3854c877 ) /* background tiles */
  406.     ROM_CONTINUE(               0x04000, 0x2000 )
  407.     ROM_CONTINUE(               0x02000, 0x2000 )
  408.     ROM_CONTINUE(               0x06000, 0x2000 )
  409.  
  410.     ROM_REGION( 0x0200, REGION_PROMS )
  411.     ROM_LOAD( "gb08.k10",       0x0000, 0x0100, 0x509c65b6 )
  412.     ROM_LOAD( "gb09.k6",        0x0100, 0x0100, 0xaa090565 )    /* unknown */
  413. ROM_END
  414.  
  415. ROM_START( shootouj )
  416.     ROM_REGION( 0x20000, REGION_CPU1 )    /* 2 * 128k for code  */
  417.     ROM_LOAD( "cg02.bin",    0x08000, 0x8000, 0x8fc5d632 )
  418.     ROM_LOAD( "cg00.bin",    0x10000, 0x8000, 0xef6ced1e )
  419.     ROM_LOAD( "cg01.bin",    0x18000, 0x4000, 0x74cf11ca )
  420.  
  421.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  422.     ROM_LOAD( "cu11.h19",       0x00000, 0x4000, 0xeff00460 ) /* foreground characters */
  423.  
  424.     ROM_REGION( 0x30000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  425.     ROM_LOAD( "cg03.bin",    0x00000, 0x8000, 0x5252ec19 )    /* sprites */
  426.     ROM_LOAD( "cg04.bin",    0x10000, 0x8000, 0xdb06cfe9 )
  427.     ROM_LOAD( "cg05.bin",    0x20000, 0x8000, 0xd634d6b8 )
  428.  
  429.     ROM_REGION( 0x08000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  430.     ROM_LOAD( "cu10.h17",       0x00000, 0x2000, 0x3854c877 ) /* background tiles */
  431.     ROM_CONTINUE(               0x04000, 0x2000 )
  432.     ROM_CONTINUE(               0x02000, 0x2000 )
  433.     ROM_CONTINUE(               0x06000, 0x2000 )
  434.  
  435.     ROM_REGION( 0x0200, REGION_PROMS )
  436.     ROM_LOAD( "gb08.k10",       0x0000, 0x0100, 0x509c65b6 )
  437.     ROM_LOAD( "gb09.k6",        0x0100, 0x0100, 0xaa090565 )    /* unknown */
  438. ROM_END
  439.  
  440. ROM_START( shootoub )
  441.     ROM_REGION( 2 * 0x20000, REGION_CPU1 )    /* 128k for code  */
  442.     ROM_LOAD( "shootout.006", 0x08000, 0x8000, 0x2c054888 )
  443.     ROM_LOAD( "shootout.008", 0x10000, 0x8000, 0x9651b656 )
  444.     ROM_LOAD( "cg01.bin",     0x18000, 0x4000, 0x74cf11ca )
  445.  
  446.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  447.     ROM_LOAD( "cu11.h19",       0x00000, 0x4000, 0xeff00460 ) /* foreground characters */
  448.  
  449.     ROM_REGION( 0x30000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  450.     ROM_LOAD( "shootout.005",   0x00000, 0x8000, 0xe6357ba3 )    /* sprites */
  451.     ROM_LOAD( "shootout.004",   0x10000, 0x8000, 0x7f422c93 )
  452.     ROM_LOAD( "shootout.003",   0x20000, 0x8000, 0xeea94535 )
  453.  
  454.     ROM_REGION( 0x08000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  455.     ROM_LOAD( "cu10.h17",       0x00000, 0x2000, 0x3854c877 ) /* background tiles */
  456.     ROM_CONTINUE(               0x04000, 0x2000 )
  457.     ROM_CONTINUE(               0x02000, 0x2000 )
  458.     ROM_CONTINUE(               0x06000, 0x2000 )
  459.  
  460.     ROM_REGION( 0x0200, REGION_PROMS )
  461.     ROM_LOAD( "gb08.k10",       0x0000, 0x0100, 0x509c65b6 )
  462.     ROM_LOAD( "gb09.k6",        0x0100, 0x0100, 0xaa090565 )    /* unknown */
  463. ROM_END
  464.  
  465. static void init_shootout(void)
  466. {
  467.     unsigned char *rom = memory_region(REGION_CPU1);
  468.     int diff = memory_region_length(REGION_CPU1) / 2;
  469.     int A;
  470.  
  471.     memory_set_opcode_base(0,rom+diff);
  472.  
  473.     for (A = 0;A < diff;A++)
  474.         rom[A+diff] = (rom[A] & 0x9f) | ((rom[A] & 0x40) >> 1) | ((rom[A] & 0x20) << 1);
  475. }
  476.  
  477. GAMEX( 1985, shootout, 0,        shootout, shootout, shootout, ROT0, "Data East USA", "Shoot Out (US)", GAME_NO_COCKTAIL )
  478. GAMEX( 1985, shootouj, shootout, shootouj, shootout, 0,        ROT0, "Data East USA", "Shoot Out (Japan)", GAME_NO_COCKTAIL )
  479. GAMEX( 1985, shootoub, shootout, shootouj, shootout, shootout, ROT0, "bootleg", "Shoot Out (Korean Bootleg)", GAME_NO_COCKTAIL )
  480.